// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import axios from 'axios'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import VueI18n from 'vue-i18n'
/* ---------基本使用----------- */
import zh from '@/lang/zh'

Vue.use(VueI18n)

Vue.use(ElementUI)

Vue.config.productionTip = false
const i18n = new VueI18n({
	locale: 'zh', // 语言标识
	messages: {
		en: {
			message: {
				hello: 'hello world'
			}
		},
		zh: zh
	}
})

// 全局的 axios 默认值
// axios.defaults.baseURL = ''
// axios.defaults.headers.common['Authorization'] = AUTH_TOKEN
// axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded'
Vue.prototype.$http = axios
Vue.prototype.HOST = '/api'
/* eslint-disable no-new */
new Vue({
	el: '#app',
	i18n,
	router,
	components: { App },
	template: '<App/>'
})
